const router = require('koa-router')()
const { models } = require('../../model')

// 文章内容
router.get('/redirect', async function (ctx) {
    const query = ctx.query
    //
    const doc = await models.Redirect.findOne({ to: query.to })

    ctx.wrapper.succ(doc)
})

module.exports = router
